#ifndef __XMLHELPERS_H__
#define __XMLHELPERS_H__

#include <string>
#include <rapidxml.hpp>
#include "error.h"

void XMLGetValue (std::string & valbuf, rapidxml::xml_node<> * node) throw(Error);
void XMLGetValue (std::string & valbuf, rapidxml::xml_attribute<> * node) throw(Error);
void XMLGetValue (std::string & valbuf, rapidxml::xml_node<> * node, const std::string & attr_name) throw(Error);

void XMLGetValue (int & valbuf, rapidxml::xml_node<> * node) throw(Error);
void XMLGetValue (int & valbuf, rapidxml::xml_attribute<> * node) throw(Error);
void XMLGetValue (int & valbuf, rapidxml::xml_node<> * node, const std::string & attr_name) throw(Error);

void XMLGetValue (bool & valbuf, rapidxml::xml_node<> * node) throw(Error);
void XMLGetValue (bool & valbuf, rapidxml::xml_attribute<> * node) throw(Error);
void XMLGetValue (bool & valbuf, rapidxml::xml_node<> * node, const std::string & attr_name) throw(Error);

rapidxml::xml_node<> * XMLGetNode (rapidxml::xml_document<> & xml, const std::string & node_name) throw (Error);
rapidxml::xml_node<> * XMLGetNode (rapidxml::xml_node<> * node, const std::string & node_name) throw (Error);
rapidxml::xml_node<> * XMLGetSibling (rapidxml::xml_node<> * node) throw(Error);
#endif
